<template>
	<view class="page">
		<view class="h30"></view>
		<view class="block">
			<view class="my-tab">
				<view class="tab-name">型号</view>
				<view class="flex-SB">
					<view class="tab-content">{{member.dev_name||'-'}}</view>
					<u-icon name="arrow-right" color="#ccc"></u-icon>
				</view>
			</view>
			<view class="my-tab">
				<view class="tab-name">IMEI</view>
				<view class="flex-SB">
					<view class="tab-content">{{member.imei||''}}</view>
					<u-icon name="arrow-right" color="#ccc"></u-icon>
				</view>
			</view>
		</view>
		<view class="btn" style="margin-top: 40rpx;">
			<u-button @click="unbind" type="primary" text="解绑设备"></u-button>
			<!-- <u-button @click="toServece()" type="primary" text="返回"></u-button> -->
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		computed: {
			...mapState(['member'])
		},
		data() {
			return {
			};
		},
		methods:{
			unbind(){
				uni.$u.http.post('/client/unbind_imei',{imei:this.member.imei,phone:this.member.phone}).then(res=>{
					uni.reLaunch({
						url:"/pages/index/mime?update=1"
					})
					this.$store.state.tiredInfo.title = ""
					this.$store.state.stressInfo.title = ""
					this.$store.state.emotionInfo.title = ""
				})
			}
		}
	}
</script>

<style  lang="scss" scoped>
	
	.block{
		width: 660rpx;
	}
	.my-tab {
		margin: 10rpx auto;
		display: flex;
		justify-content: space-between;
		position: relative;
	}
	
	.tab-name,.tab-content {
		height: 92rpx;
		line-height: 92rpx;
		font-size: 28rpx;
		color: #2E2E2E;
		font-weight: bold;
	}
	.tab-content{
		color: #999;
	}
</style>
